package com.test.math;

import com.test.utils.SequenceIdGenerator;

public class IdDemo {

    public static void main(String[] args) {
        String[] keys = new String[]{
                "fruits_retail_commission",
                "fruits_batch_commission",
                "gift_commission",
                "farmer_bail",
                "business_bail",
                "default_receive_time",
                "default_complaint_time"
        };
        String[] values = new String[]{
                "0.03",
                "0.015",
                "0.3",
                "500",
                "1000",
                "120",
                "48"
        };

        String sql = "INSERT INTO sys_param(Id, ParamKey, ParamValue, UpdateTime) VALUES(%s, '%s', '%s', NOW());";
        SequenceIdGenerator idGenerator = new SequenceIdGenerator(13, 13);
        for (int i = 0; i < keys.length; i++) {
            System.out.println(String.format(sql, idGenerator.nextId(), keys[i], values[i]));
        }

    }
}
